X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/ae9d78b70625763cb86e8eeaf4949d3824dc230d..6e8a139250e34cbc1c5e161bc5b27411430edd37:/AESL/Damped%20Harmonic%20Oscillator.AESL?ds=inline diff --git a/AESL/Damped Harmonic Oscillator.AESL b/AESL/Damped Harmonic Oscillator.AESL index 12a995e..7451fcb 100644 --- a/AESL/Damped Harmonic Oscillator.AESL +++ b/AESL/Damped Harmonic Oscillator.AESL @@ -10,11 +10,11 @@ REQUIRES SUMMER 2 DATA DIVISION OUTPUT OUTPUT.U y -ALIAS COEFFICIENT.1 InitialPosition -ALIAS COEFFICIENT.2 InitialSpeed -ALIAS COEFFICIENT.3 SpringForce -ALIAS COEFFICIENT.4 Damping # linear to speed -ALIAS COEFFICIENT.5 Mass # 1 / mass +COEFFICIENT.1 InitialPosition +COEFFICIENT.2 InitialSpeed +COEFFICIENT.3 SpringForce +COEFFICIENT.4 Damping # linear to speed +COEFFICIENT.5 Mass # 1 / mass PROGRAM DIVISION # Colors being used for wiring @@ -23,16 +23,16 @@ PROGRAM DIVISION # - green: y0’’ # - yellow: y’’, y’ # - red: y --1 -> InitialPosition -> -y0 # -initial position of the mass --1 -> InitialSpeed -> y0s’ # y’ is scaled to be within -1..+1 -+1, y0s’, y0s’ -> Summer.1 -> y0’ -y’’, IC:y0’ -> INTEGRATOR.1 -> -y’ --y’,IC:-y0 -> INTEGRATOR.2 -> y -y -> SpringForce -> S*y # springforce times displacement --y’ -> INVERTER.1 -> y’ -y’ -> Damping -> D*y’ # damping times speed -S*y, D*y’ -> SUMMER.2 -> -(Dy’+Sy) --(Dy’+Sy) -> Mass -> -1/m*(Dy’+Sy)=y’’ +-1 -> COEFFICIENT.InitialPosition -> -y0 # -initial position of the mass +-1 -> COEFFICIENT.InitialSpeed -> y0s’ # y’ is scaled to be within -1..+1 ++1, y0s’, y0s’ -> SUMMER -> y0’ +y’’, IC:y0’ -> INTEGRATOR -> -y’ +-y’,IC:-y0 -> INTEGRATOR -> y +y -> COEFFICIENT.SpringForce -> S*y # springforce times displacement +-y’ -> INVERTER -> y’ +y’ -> COEFFICIENT.Damping -> D*y’ # damping times speed +S*y, D*y’ -> SUMMER -> -(Dy’+Sy) +-(Dy’+Sy) -> COEFFICIENT.Mass -> -1/m*(Dy’+Sy)=y’’ OPERATION DIVISION MODE REPEAT